<template>
  <!-- 导航盒子 -->
  <div class="nav-box">
    <div class="nav-list">
      <router-link to="/music" class="nav-item">首页</router-link>
      <router-link to="/music/selected-playlists" class="nav-item">精选歌单</router-link>
      <router-link to="/music/popular-playlists" class="nav-item">热门榜单</router-link>
      <router-link to="/music/new-songs" class="nav-item">新歌首发</router-link>
      <router-link to="/music/recommendation-mv" class="nav-item">推荐MV</router-link>
    </div>
  </div>
</template>

<script setup>

</script>

<style scoped lang="scss">
.nav-box {
  max-width: 1200px;
  margin: 0 auto;
  background-color: #fff;
  border-radius: 4px;
  padding: 0;

  .nav-list {
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;

    .nav-item {
      flex: 1;
      font-size: 15px;
      color: #333;
      text-decoration: none;
      position: relative;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      font-weight: 500;
      transition: color 0.3s;
      margin: 0;

      &:hover {
        color: #2d8cf0;
      }

      &.router-link-active {
        color: #2d8cf0;
        font-weight: 600;

        &::after {
          content: "";
          position: absolute;
          bottom: 0;
          left: 50%;
          transform: translateX(-50%);
          width: 30px;
          height: 2px;
          background-color: #2d8cf0;
          border-radius: 1px;
        }
      }

      &:not(:last-child)::after {
        content: "";
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 14px;
        background-color: #e5e5e5;
      }
    }
  }
}
</style>
